﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Text;
public partial class admin_UserControl_VolunteerAutoComplete : System.Web.UI.UserControl
{
    private string _Text;

    public string Text
    {
        get { return txtName.Text; }
        set { txtName.Text = value; }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            UIInit();
        }
    }

    private void UIInit()
    {
        string sqlStr = "select NickName from User_Volunteer where Isdelete = 0 and IsEnable = 1";
        DataTable dt = DAL.Common.Query(sqlStr);
        StringBuilder sb = new StringBuilder();
        foreach (DataRow dr in dt.Rows)
        {
            sb.Append(dr["NickName"] + "|");
        }
        VolunteerList.Value = Common.StringDispose.Left(sb.ToString(), -1);
    }
}